//
//  BlogViewPresenter.h
//  CharlesMVX
//
//  Created by Charles on 2020/3/11.
//  Copyright © 2020 Charles. All rights reserved.
//

#import <Foundation/Foundation.h>
#import "UserAPIManager.h"

NS_ASSUME_NONNULL_BEGIN

@class BlogCellPresenter,BlogViewPresenter;

@protocol BlogViewPresenterCallBack <NSObject>

- (void)blogViewPresenter:(BlogViewPresenter *)presenter didRefreshDataWithResult:(id)result error:(NSError *)error;
- (void)blogViewPresenter:(BlogViewPresenter *)presenter didLoadMoreDataWithResult:(id)result error:(NSError *)error;

@end

@interface BlogViewPresenter : NSObject

@property (weak, nonatomic) id<BlogViewPresenterCallBack> callBack;

+ (instancetype)presenterWithUserId:(NSUInteger)userId;

- (NSArray<BlogCellPresenter *> *)allDatas;
- (void)refreshData;
- (void)loadMoreData;
- (void)fetchDataWithCompletionHandler:(NetworkCompletionHandler __nullable)completionHander;

@end

NS_ASSUME_NONNULL_END
